import Vue from "vue";
import Vuex from "vuex";
import VuexPersistence from "vuex-persist";
import * as actions from "./actions";
import * as getters from "./getters";
import state from "./state";
import mutations from "./mutations";

Vue.use(Vuex);
const vuexLocal = new VuexPersistence({
  storage: window.localStorage
});

export default new Vuex.Store({
  actions,
  getters,
  state,
  mutations,
  plugins: [vuexLocal.plugin]
});
